// 登录与权限管理路由
const express = require('express');
const authController = require('../controllers/authController');
const {authMiddleware} = require('../middlewares/authMiddleware');

const router = express.Router();

// 登录
router.post('/login', authController.login);
// 退出登录
router.post('/logout', authController.logout);
// 获取用户信息
router.get('/info', authMiddleware, authController.info);
// 获取用户权限
router.get('/menu', authMiddleware, authController.getMenu);

module.exports = router;
